#include "String.h"

void test1()
{
    my_string::string s1(10, 'a');
    cout << s1 << endl;
}

void test2()
{
    my_string::string s1("abcdef");
    cout << s1 << endl;
    my_string::string s2(" hello ");
    s1 += s2;
    cout << s1 << endl;
    s1 += "world!!!";
    cout << s1 << endl;
}

void test3()
{
    my_string::string s1("abcdef");
    my_string::string s2;
    cin >> s2;
    cout << s1 << endl << s2 << endl;
    
    s2.append(10, '!');
    cout << s2 << endl;
    s2.push_back('o');
    s2.push_back('o');
    s2.push_back('o');
    s2.push_back('o');
    s2.push_back('o');
    s2.push_back('o');
    cout << s2 << endl;
    s2.append(s1);
    cout << s2 << endl;
}

void teststring()
{
    my_string::test1();
    cout << endl;
    my_string::test2();
    cout << endl;
    my_string::test3();
    cout << endl;
}

int main()
{
    //test1();
    //cout << endl;
    //test2();
    //cout << endl;
    //test3();

    teststring();


    return 0;
}
